package com.ruisoft.business.purchase.bean;

import javax.persistence.*;

/**
 * Created with IntelliJ IDEA.
 * User: LFC
 * Date: 2015/6/23
 * Time: 21:33
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "purchase_product", schema = "", catalog = "ruitest")
public class PurchaseProduct {
    private String purchaseproId;
    private String purchateamCode;
    private String proCode;
    private String proName;
    private String proNorms;
    private String proBrand;
    private String note;
    private String createUser;
    private String createDate;
    private String writeUser;
    private String writeDate;

    @Id
    @Column(name = "purchasepro_id", nullable = false, insertable = true, updatable = true, length = 36)
    public String getPurchaseproId() {
        return purchaseproId;
    }

    public void setPurchaseproId(String purchaseproId) {
        this.purchaseproId = purchaseproId;
    }

    @Basic
    @Column(name = "purchateam_code", nullable = true, insertable = true, updatable = true, length = 36)
    public String getPurchateamCode() {
        return purchateamCode;
    }

    public void setPurchateamCode(String purchateamCode) {
        this.purchateamCode = purchateamCode;
    }

    @Basic
    @Column(name = "pro_code", nullable = true, insertable = true, updatable = true, length = 36)
    public String getProCode() {
        return proCode;
    }

    public void setProCode(String proCode) {
        this.proCode = proCode;
    }

    @Basic
    @Column(name = "pro_name", nullable = true, insertable = true, updatable = true, length = 36)
    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    @Basic
    @Column(name = "pro_norms", nullable = true, insertable = true, updatable = true, length = 36)
    public String getProNorms() {
        return proNorms;
    }

    public void setProNorms(String proNorms) {
        this.proNorms = proNorms;
    }

    @Basic
    @Column(name = "pro_brand", nullable = true, insertable = true, updatable = true, length = 36)
    public String getProBrand() {
        return proBrand;
    }

    public void setProBrand(String proBrand) {
        this.proBrand = proBrand;
    }

    @Basic
    @Column(name = "note", nullable = true, insertable = true, updatable = true, length = 256)
    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Basic
    @Column(name = "CreateUser", nullable = true, insertable = true, updatable = true, length = 20)
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Basic
    @Column(name = "CreateDate", nullable = true, insertable = true, updatable = true, length = 20)
    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "WriteUser", nullable = true, insertable = true, updatable = true, length = 20)
    public String getWriteUser() {
        return writeUser;
    }

    public void setWriteUser(String writeUser) {
        this.writeUser = writeUser;
    }

    @Basic
    @Column(name = "WriteDate", nullable = true, insertable = true, updatable = true, length = 20)
    public String getWriteDate() {
        return writeDate;
    }

    public void setWriteDate(String writeDate) {
        this.writeDate = writeDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PurchaseProduct that = (PurchaseProduct) o;

        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (createUser != null ? !createUser.equals(that.createUser) : that.createUser != null) return false;
        if (note != null ? !note.equals(that.note) : that.note != null) return false;
        if (proBrand != null ? !proBrand.equals(that.proBrand) : that.proBrand != null) return false;
        if (proCode != null ? !proCode.equals(that.proCode) : that.proCode != null) return false;
        if (proName != null ? !proName.equals(that.proName) : that.proName != null) return false;
        if (proNorms != null ? !proNorms.equals(that.proNorms) : that.proNorms != null) return false;
        if (purchaseproId != null ? !purchaseproId.equals(that.purchaseproId) : that.purchaseproId != null)
            return false;
        if (purchateamCode != null ? !purchateamCode.equals(that.purchateamCode) : that.purchateamCode != null)
            return false;
        if (writeDate != null ? !writeDate.equals(that.writeDate) : that.writeDate != null) return false;
        if (writeUser != null ? !writeUser.equals(that.writeUser) : that.writeUser != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = purchaseproId != null ? purchaseproId.hashCode() : 0;
        result = 31 * result + (purchateamCode != null ? purchateamCode.hashCode() : 0);
        result = 31 * result + (proCode != null ? proCode.hashCode() : 0);
        result = 31 * result + (proName != null ? proName.hashCode() : 0);
        result = 31 * result + (proNorms != null ? proNorms.hashCode() : 0);
        result = 31 * result + (proBrand != null ? proBrand.hashCode() : 0);
        result = 31 * result + (note != null ? note.hashCode() : 0);
        result = 31 * result + (createUser != null ? createUser.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + (writeUser != null ? writeUser.hashCode() : 0);
        result = 31 * result + (writeDate != null ? writeDate.hashCode() : 0);
        return result;
    }
}
